<h3>Circle</h3>
<div style="float:left;">
    <div id="kineticjs_circle"></div>
</div>

<div style="float:right;width:50%;">
    <textarea style="width: 90%;height: 300px;" id="code_kineticjs_circle">
   var stage = new Kinetic.Stage({
        container: 'kineticjs_circle',
        width: 578,
        height: 200
      });

      var layer = new Kinetic.Layer();

      var circle = new Kinetic.Circle({
        x: stage.getWidth() / 2,
        y: stage.getHeight() / 2,
        radius: 70,
        fill: 'red',
        stroke: 'black',
        strokeWidth: 4
      });

      // add the shape to the layer
      layer.add(circle);

      // add the layer to the stage
      stage.add(layer);
    
    </textarea><br />
    <input type="button" value="run" onclick="run_code('#code_kineticjs_circle')" />
    
</div>
<script type="text/javascript">
<!--
	$(function(){
	   run_code('#code_kineticjs_circle');
	})
-->
</script>
